<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><![endif]-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>游戏服管理</title>

    <%@include file="../include/csslib.jsp"%>
	<link href="${pageContext.request.contextPath}/static/web_css/game/game.css" rel="stylesheet" type="text/css">
</head>

<body>

<div class="wrapper dashboard">

    <!-- 右侧 -->
    <div class="main">

        <!-- 内容区 -->
        <div class="content_container container-fluid">
            <div class="row">
                <!-- pane1 -->
                <div class=" col-sm-12">
                    <div class="pane">
                      <h2><span>游戏服列表</span></h2>

                        <div class="pane_condition">

                        </div>

                        <div class="pane_content">

                            <table id="table" data-sort-name="createTime" data-sort-order="desc"></table>

                        </div>

                    </div>
                </div>
            </div>

        </div>
        <!-- 内容区结束 -->

    </div>
    <!-- 右侧  结束-->




</div>

 <div id="toolbar" >
    <button id="btn_online" type="button" class="btn btn-success">
        <span class="icon"><i class="fa"></i></span>查看线上游戏服
    </button>
    
    <button id="btn_offline" type="button" class="btn btn-danger">
        <span class="icon"><i class="fa"></i></span>查看线下游戏服
    </button>
    
    <button id="btn_manual_install" type="button" class="btn btn-info btn-icon">
        <span class="icon"><i class="fa fa-plus"></i></span>手动安装游戏服
    </button>
    
    <button id="btn_auto_install" type="button" class="btn btn-success btn-icon">
        <span class="icon"><i class="fa fa-plus"></i></span>自动安装游戏服
    </button>
 	
   	<button id="btn_edit" type="button" class="btn btn-success btn-icon">
        <span class="icon"><i class="fa fa-edit"></i></span>修改
    </button>

    <button id="btn_delete" type="button" class="btn btn-danger btn-icon">
        <span class="icon"><i class="fa fa-trash"></i></span>删除
    </button>
    
    <button id="btn_close" type="button" class="btn btn-danger btn-icon">
        <span class="icon"><i class="fa fa-trash"></i></span>业务停服
    </button>
    
    <br>
    
    <button id="btn_start_game_process" type="button" class="btn btn-success">
        <span class="icon"><i class="fa"></i></span>启动游戏服务进程
    </button>

    <button id="btn_show_game_process_log" type="button" class="btn btn-success">
        <span class="icon"><i class="fa"></i></span>查看游戏服务进程日志
    </button>
    
    <button id="btn_print_list" type="button" class="btn btn-info">
        <span class="icon"><i class="fa"></i></span>打印更新列表（多渠道）
    </button>
</div>


 <div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="detailModalTitle"></h4>
            </div>
            <div class="modal-body">
                <form id="manual_install_form">
    	            <div class="form-group required">
		                <label for="gameId">选择游戏:</label>
	                    <select id="gameId" name="gameId">
	                    	
	                    </select>
		            </div>
		            
		            <div class="form-group required">
		                <label for="channelId">选择渠道:</label>
	                    <select id="channelId" name="channelId">
	                    	
	                    </select>
		            </div>
		            
		            <div class="form-group required">
		                <label for="hostId">选择最佳部署机器:</label>
	                    <select id="hostId" name="hostId">
	                    	
	                    </select>
		            </div>
                
                    <input type="hidden" id="action_type" name="action_type" >
                    <div class="form-group required">
                        <label for="game_server_num">游戏服序号:</label>
                        <input type="text" class="form-control" id="game_server_num" name="game_server_num" placeholder="s999a">
                    </div>
                    <div class="form-group required">
                        <label for="game_server_id">服务器ID:</label>
                        <input type="text" class="form-control" id="game_server_id" name="game_server_id" placeholder="51">
                    </div>
                    <div class="form-group required">
                        <label for="domain">域名:</label>
                        <input type="text" class="form-control" id="domain" name="domain" placeholder="HunFu1.whj.game1919.com">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" id="btn_submit" class="btn btn-primary">提交</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

 <div class="modal fade" id="editDetailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="editDetailModalTitle"></h4>
            </div>
            <div class="modal-body">
                <form id="edit_form">
    	            <div class="form-group required">
    	            	<input type="hidden"  id="gpId" name="gpId" >
    	            
                        <label for="name">游戏服名:</label>
                        <input type="text" class="form-control" id="name" name="name">
                    </div>
                </form>
            </div>
            
            <div class="modal-footer">
                <button type="button" id="edit_btn_submit" class="btn btn-primary">提交</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="autoInstallModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="autoInstallModalTitle"></h4>
            </div>
            <div class="modal-body">
                <form id="auto_install_form">
					<div class="form-group required">
		                <label for="auto_install_gameId">选择游戏:</label>
	                    <select id="auto_install_gameId" name="gameId">
	                    	
	                    </select>
		            </div>
		            
		            <div class="form-group required">
		                <label for="auto_install_channelId">选择渠道:</label>
	                    <select id="auto_install_channelId" name="channelId">
	                    	
	                    </select>
	                    
	                    <span id="availableNum" style="color:red"></span>
		            </div>
		            
		            <div class="form-group required">
                        <label for="auto_install_game_server_num">游戏服序号:</label>
                        <input readonly="readonly" type="text" class="form-control" id="auto_install_game_server_num" name="game_server_num" placeholder="s999a">
                    </div>
                    
                    <div class="form-group required">
                        <label for="auto_install_game_server_id">服务器ID:</label>
                        <input readonly="readonly" type="text" class="form-control" id="auto_install_game_server_id" name="game_server_id" placeholder="51">
                    </div>
                              
		            <div class="form-group required">
                        <label for="auto_install_domain">域名:</label>
                        <input readonly="readonly" type="text" class="form-control" id="auto_install_domain" name="domain">
                    </div>
                 
		            <div class="form-group required">
		                <label for="auto_install_hostId">选择最佳部署机器:</label>
	                    <select id="auto_install_hostId" name="hostId">
	                    	
	                    </select>
		            </div>
    
		            <div class="form-group required">
                        <label for="auto_install_server_name">游戏服名称:</label>
                        <input type="text" class="form-control" id="auto_install_server_name" name="server_name">
                    </div>
                    
                    <div class="form-group required">
                        <label for="">开服时期:</label>
                    	<input type="text" name="game_start_date" id="auto_install_game_start_date" placeholder="2019-04-30" class="form-control">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" id="auto_install_btn_submit" class="btn btn-primary">提交</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<%@include file="../include/jslib.jsp"%>
<script src="${pageContext.request.contextPath}/static/web_js/game/game_process.js"></script>
</body>
</html>